package 第六章作业;
/*
 * 吕忠涛43
 */
public class 主 {
	public static double max(double a,double b,double c,double d,double e) {
		double max = 0;
		double arr[]= {a,b,c,d,e};
		for(int j = 0;j<5;j++) {
	if(arr[j]>max) {
		max = arr[j];
	}
		}
		return max;
	}
	public static double min(double a,double b,double c,double d,double e) {
		double arr[]= {a,b,c,d,e};
		double min = arr[1];
		for(int j = 0;j<5;j++) {
	if(arr[j]<min) {
		min = arr[j];
	}
		}
		return min;
	}
public static void main(String[] args) {
	Student s1 = new Student("s10001","张三","男",18,90);
	Student s2 = new Student("s10002","李四" ,"女",15,92);
	Student s3 = new Student("s10003" ,"王五","男",17,93);
	Student s4= new Student("s10004","赵六" ,"男",21,95);
	Student s5 = new Student("s10005","钱七","男",19,97);
	System.out.println("java成绩平均值是："+(s1.chengji+s2.chengji+s3.chengji+s4.chengji+s5.chengji)/5);
	System.out.println("最高分是："+max(s1.chengji,s2.chengji,s3.chengji,s4.chengji,s5.chengji));
	System.out.println("最低分是："+min(s1.chengji,s2.chengji,s3.chengji,s4.chengji,s5.chengji));
	
	
	
}
}
